#ifndef P_AVERAGE_TIME_H
#define P_AVERAGE_TIME_H

#include <QMainWindow>
#include <global_variable.h>

class P_Average_Time : public QMainWindow
{
    Q_OBJECT
public:
    explicit P_Average_Time(QWidget *parent = 0);
    bool eventFilter(QObject *watched, QEvent *event);
    void ui_Label_Init();
    void ui_Btn_Init();
    void connect_Init();
    void time_Init();
    int pos=0;
    int totalBtn =8;
    QTimer  *timer;
    QTimer  *timer2;
    QString str_show;
    bool show_flag=0;
    bool change_flag=0;  //1代表修改数据模式  0代表按键控制模式
    int elec_flag=0;//只是代表种类，用来切换
    QPushButton *theBtn[8];
    QLabel *theLabel[10];
    QList <QPushButton * >btnlist_ui;
    QString Elec_Gas[6]={"电磁阀 A","电磁阀 B","电磁阀 C","电磁阀 D","电磁阀 E","电磁阀 F"};//存储3种气体分别对应的电磁阀名字
    int Mode_aver_X=0;//光度计平均时间下标临时
    void reciveDensity();

signals:

public slots:
};

#endif // P_AVERAGE_TIME_H
